<?
/*

	Search
	Sidebar plugin
	
*/	

	// Tell the system we are a sidebar plugin
	function search_pluginType() { 
		return "sidebar";	
	}
	
	// Tell the system our full name
	function search_pluginName() {
		return "Puddle search";
	}
	
	// The description of our services as a plugin
	function search_pluginDescription() {
		return "Allow visitors to search your archive of puddle updates";
	}
	
	// can we edit settings?
	function search_hasEdit() {
		return true;
	}
	

	// This is displayed to the user , and should contain all options for setting up the plugin
	//	 presetoptions is an array
	//		either null or contains all the options incase of editing this plugin
	function search_optionForm($presetoptions) {
		if ($presetoptions) $values=explode("|",$presetoptions);

		$form="";
		$form.="Title for widget<br/>";
		$form.="<input type='text' name='title'";
		if ($presetoptions) $form.="value='".$values[2]."'";
		$form.="/>";
		
		return $form;
	}


	// Assemble the plugin return string based on the $_POST array values
	//	use | between each setting..  result will be htmlified
	function search_addPlugin() {
		$formline="";
		//$formline.=$_POST['content'];
		return $formline;
	}
	
	
	// Print the result !
	function search_draw($line) {
		$blogRoot;
		
		print "<div class='sidebarcontent'>";
?>
		<form action="#" method="post">
			<input type='hidden' name='plugin' value='search'>
			<input type='text' name='keywords' value=''>
			<input type="submit" name="pluginsubmit" value="Search">
		</form>
<?		
		print "</div>";
	}

?>